﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProductKeyManager.DB;
using System.Xml.Linq;

namespace ProductKeyManager.Xml
{
    /// <summary>
    /// Interface for Xml Handlers
    /// </summary>
    public interface IXmlHandler
    {
        /// <summary>
        /// Gets the products imported from the XML.
        /// </summary>
        /// <value>The products.</value>
        IEnumerable<Product> Products { get; }

        /// <summary>
        /// Imports the XML.
        /// </summary>
        /// <param name="fileUri">The file URI.</param>
        void ImportXml(Uri fileUri);

        /// <summary>
        /// Gets the XML generated by from the products.
        /// </summary>
        /// <value>The generated XML.</value>
        string GeneratedXml { get; }

        /// <summary>
        /// Generates the XML.
        /// </summary>
        /// <param name="products">The products.</param>
        /// <returns></returns>
        void GenerateXml(IEnumerable<Product> products);
        /// <summary>
        /// Generates the XML.
        /// </summary>
        /// <param name="products">The products.</param>
        /// <param name="generateStyleSheet">if set to <c>true</c> the stylesheet is generated.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <returns></returns>
        void GenerateXml(IEnumerable<Product> products, bool generateStyleSheet, string fileName);
    }
}
